<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>40scale案例实现图片放大</title>
    <style>
        .box {
            float: left;
            width: 140px;
            height: 140px;
            margin: 10px;
            border: 1px solid;
            overflow: hidden;
        }
        
        .box img {
            transition: all .5s;
        }
        
        .box:hover img {
            transform: rotate(45deg) scale(1.2) translate(50px);
        }
        /* 如果同时有位移和其他属性时，要优先写位移translate */
        
        .box2:hover img {
            transform: translate(50px) rotate(45deg) scale(1.2);
        }
    </style>
</head>

<body>
    <div class="box">
        <a href="#"><img src="./images/like06.jpg" alt=""></a>
    </div>
    <div class="box box2">
        <a href="#"><img src="./images/like06.jpg" alt=""></a>
    </div>
    <div class="box box3">
        <a href="#"><img src="./images/like06.jpg" alt=""></a>
    </div>
</body>

</html>